#include "atUtil.h"
#include "Vector3.h"

namespace AtomTrace
{
	const Vector3 GetCrossNormal(const Vector3 & v1, const Vector3 & v2)
	{
		Vector3 N = v1.Cross(v2);
		N.Normalize();
		return N;
	}

// **** WARNING: BITWISE OPERATION NOT WORK ON SIM ****
    void ConvertLineIndexToZindexXY(int ival, int & ox, int & oy)
    {
        int tPix = ival;
        ox = oy = 0;
        for(int i=0; i<16; i++)
        { 
            ox |= ((tPix >> (i*2)) & 1) << i;
            oy |= ((tPix >> (i*2+1)) & 1) << i;
        }
    }

// ***************************************************
}
